﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExamPaperCreate.aspx.cs" Inherits="Web.ExamPaperCreate" %>
<%@ Register TagPrefix="uc1" TagName="TopMenu" Src="TopMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Floor" Src="Floor.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>海淀区学校素质评测管理平台</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="js/boxy/stylesheets/boxy.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/boxy/javascripts/jquery.boxy.js" type="text/javascript"></script>
    <script src="js/module.js"></script>
    <script language="javascript" type="text/javascript">
    function SelectAll(chAllId,formId)
    {
        var allValue=document.forms[formId][chAllId].checked;
         for(var i=0 ; i< document.forms[formId].length;i++)   
         {     
             if( document.forms[formId][i].type == "checkbox")     
             {   
                document.forms[formId][i].checked   =   allValue; 
             }   
         }   
         return   false;   
    }
    function   GetAllCheckValues(formId)    
    {      
         var ids="";
         for(var i=0 ; i< document.forms[formId].length;i++)   
         {     
            if( document.forms[formId][i].type == "checkbox" && document.forms[formId][i].checked &&  document.forms[formId][i].id.indexOf("ckItem")!=-1)      
            {   
                ids=ids+document.forms[formId][i].value+',';
            }   
         }   
         return   ids;   
    } 
    function Refresh()
    {
        window.document.getElementById("btnSearch2").click();
    }
    </script>
</head>
<body>
    <uc1:TopMenu ID='menu1' runat='server'></uc1:TopMenu>
    <div id="main">
        <form id="form1" runat="server">
        <div id='block'>
            <div id='blocktitle'>
                <h3>手工选题</h3>
                <em>
                    <asp:DropDownList ID="drpQuestionType" runat="server">
                    </asp:DropDownList>&nbsp;&nbsp;
                    <input id="btnSearch2" type="button" value="搜索" style=" width:100px; visibility:hidden; display:none;" runat="server" onserverclick="btnSearch_Click" />
                    <asp:LinkButton ID="btnSearch" Width="30px" OnClick="btnSearch_Click" runat="server">搜索</asp:LinkButton>
                    
                [   
                    <% if (status == 0)
                       {
                    %>
                    <a href="ExamPaperSelect.aspx?ExamId=<% =ExamId %>&SubjectId=<% =SubjectId %>" target="_blank">选入试题</a>&nbsp;|
                    <% } %>
                    <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">移除所选</asp:LinkButton>&nbsp;|
                    <asp:LinkButton ID="lbBack" runat="server" onclick="lbBack_Click">返回</asp:LinkButton>
                    
                 ]</em></div>
            <div id="blockcontent">
                <asp:ListView ID="UserLists" runat="server">
                    <LayoutTemplate>
                        <table cellpadding="5" cellspacing="1" border="0" width="100%" style="background-color: #DFDFDF"
                            id="userlist">
                            <tr>
                                <th width="4%"><input id="ckAll" type="checkbox" name="ckAll" onclick="SelectAll('ckAll','form1');" />
                                </th>
                                <th width="4%">
                                    序号
                                </th>
                                <th>
                                   标题
                                </th>
                                <th>
                                   题型
                                </th>
                                <th>
                                    难度
                                </th>
                                <th>
                                    知识点
                                </th>
                                 <th width="5%">
                                    分数
                                </th>
                                <th>
                                   科目
                                </th>
                                <th width="10%">
                                    创建时间
                                </th>
                                <th width="10%">
                                    管理
                                </th>

                            </tr>
                            <asp:Label ID="itemPlaceholder" runat="server" Text="Label"></asp:Label></table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><input id="ckItem" runat="server" type="checkbox" value='<%# Bind("Id")%>' />
                            </td>
                            <td>
                                <asp:TextBox ID="tbOrder" Width="20px" OnDataBinding="tbOrder_DataBinding" Text='<%# Bind("Id")%>' runat="server"></asp:TextBox>
                            </td>
                            <td align="left">
                                <%# Eval("Title")%>
                            </td>
                            <td>
                                <asp:Label ID="lbQuestionType" OnDataBinding="lbQuestionType_DataBinding" runat="server" Text='<%# Eval("QuesTypeId")%>'></asp:Label> 
                            </td>
                            <td>
                                <asp:Label ID="lbDiff" OnDataBinding="lbDiff_DataBinding" runat="server" Text='<%# Eval("DifficId")%>'></asp:Label> 
                                
                            </td>
                            <td>
                                <asp:Label ID="lbKnow" OnDataBinding="lbKnow_DataBinding" runat="server" Text='<%# Eval("KnowId")%>'></asp:Label> 
                                
                            </td>
                            <td  align="left">
                                <%# Eval("Score")%>
                            </td>
                            <td  align="center">
                                <asp:Label ID="lbSubject" OnDataBinding="lbSubject_DataBinding" runat="server" Text='<%# Eval("SubjectId")%>'></asp:Label>
                            </td>
                            <td  align="left">
                               <%# String.Format("{0:yyyy-MM-dd}", Eval("CreateDate"))%>
                            </td>
                           
                            <td  align="left">
                                <% if (status == 0)
                                   {
                                 %>
                                <a href='javascript:Del(<%# Eval("ID")%>,<%# Pages.PageNum %>);'> 移除</a>
                                <br />
                                <asp:LinkButton ID="btnOrderSave" CommandArgument='<%# Eval("ID")%>' OnClick="btnSaveOrder_Click" runat="server">保存序号</asp:LinkButton>
                                <% } %>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
                <script language="javascript" type="text/javascript">
                    function Del(id,page)
                    {
                        var ExamId="<% =ExamId %>";
                        var qtypeid="<% =qtypeid %>";
                        var SubjectId="<% =SubjectId %>";
                        ShowConfirm("ExamPaperItemDelete.aspx?SubjectId="+SubjectId+"&qtypeid="+qtypeid+"&ExamId="+ExamId+"&delid="+id+"&page="+page,"确定要移除？",150,50);
                    }
                    function SaveOrder(id)
                    {
                        var ExamId="<% =ExamId %>";
                        alert(id);
                    }
                </script>
            </div>
            <div id="blockfloor">
                <asp:Label ID="PageLabel" runat="server" Text=""></asp:Label></div>
        </div>
        </form>
    </div>

    <script type="text/javascript">
$("#userlist th").css("background-color","#eeeeee");
$("#userlist td").css("background-color","#ffffff");
    </script>

    <uc1:Floor ID='Floor1' runat='server'></uc1:Floor>
</body>
</html>
